package Controller;
import Model.*;
import java.util.*;

public class LeaseCtr
{
    
    public LeaseCtr()
    {
        LeaseCont.getInstance();
    }

    public static void AddLease(Lease l)
    {
        LeaseCont.getInstance().addLease(l);
    }
    
    public static void DeleteLease(long theID)
    {
        for(int i=0;i<LeaseCont.getCont().size();i++)
        {
            if(LeaseCont.getCont().get(i).getID()==theID)LeaseCont.getCont().remove(i);
        }
    }
    
    public static void SearchLease(long theID)
    {
        for(int i=0;i<LeaseCont.getCont().size();i++)
        {
            if(LeaseCont.getCont().get(i).getID()==theID)System.out.println("Lease exists");
            else System.out.println("Order doesn`t exist");
    
    }
    }
}